package com.taobao.sinan.dal.sql.executor;

import java.util.Collections;
import java.util.List;

public class Result {
	private String sql;
	private ExecutorType type;
	private Integer result;
	private ExecutorContext session;

	private List<String> colums = Collections.emptyList();
	private List<List<Object>> datas = Collections.emptyList();

	public void setType(ExecutorType type) {
		this.type = type;
	}

	public boolean isTypeOf(ExecutorType type) {
		return this.type == type;
	}

	public List<String> getColums() {
		return Collections.unmodifiableList(colums);
	}

	public void setColums(List<String> colums) {
		this.colums = colums;
	}

	public List<List<Object>> getDatas() {
		return Collections.unmodifiableList(datas);
	}

	public Integer getResult() {
		return result;
	}

	public void setResult(Integer result) {
		this.result = result;
	}

	public void setDatas(List<List<Object>> datas) {
		this.datas = datas;
	}

	public String getSql() {
		return sql;
	}

	public void setSql(String sql) {
		this.sql = sql;
	}

	public ExecutorContext getSession() {
		return session;
	}

	public void setSession(ExecutorContext session) {
		this.session = session;
	}
}
